package com.sgq.vue.enums;

/**
 * @author: 83778
 * @date: 2023-12-27 18:33
 * @desc:
 */
public enum RequestConditionEnums {

    CITY_CODE(0, "城市代码"),
    CITY_EN(1, "城市英文名"),
    CITY_ZH(2, "城市中文名"),
    CITY_COORDINATE(4, "城市坐标");

    private Integer typeId;
    private String typeName;

    RequestConditionEnums(Integer typeId,String typeName) {
        this.typeId = typeId;
        this.typeName = typeName;
    }

    public Integer getTypeId() {
        return typeId;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public static RequestConditionEnums getByTypeId(Integer typeId){
        RequestConditionEnums[] values = RequestConditionEnums.values();
        for (RequestConditionEnums item : values) {
            Integer id = item.getTypeId();
            if (id.equals(typeId) ){
                return item;
            }
        }
        return null;
    }

}
